diff options
| author | Adam Soltys <[email protected]> | 2024-11-14 13:32:52 -0800 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2024-11-14 16:09:51 -0800 |
| commit | 0f35462ebdde3701e8fe927b3debace9abf79305 (patch) | |
| tree | 786d8c833e16762b87a193fb4c09d634784f7744 /src/routes/(app)/invoice/[id]/[email protected] | |
| parent | 614fbd99b7963ec89666b8b4252fa5f73c81653c (diff) | |
| download | coinos-ui-0f35462ebdde3701e8fe927b3debace9abf79305.tar.gz coinos-ui-0f35462ebdde3701e8fe927b3debace9abf79305.zip | |
payment amount helpers
Diffstat (limited to 'src/routes/(app)/invoice/[id]/[email protected]')
| -rw-r--r-- | src/routes/(app)/invoice/[id]/[email protected] | 27 |
1 files changed, 5 insertions, 22 deletions
diff --git a/src/routes/(app)/invoice/[id]/[email protected] b/src/routes/(app)/invoice/[id]/[email protected] index 05fd603f..13b121d8 100644 --- a/src/routes/(app)/invoice/[id]/[email protected] +++ b/src/routes/(app)/invoice/[id]/[email protected] @@ -1,6 +1,4 @@ <script> - import { run } from 'svelte/legacy'; - import { SvelteToast } from "@zerodevx/svelte-toast"; import { onDestroy, onMount } from "svelte"; import { close, connect, send } from "$lib/socket"; @@ -26,13 +24,12 @@ let { data, children } = $props(); - let { generate, rate, user, subject, token, rates, theme } = $state(data); - - let update = (data) => { - ({ rate, user, subject, token, rates, theme } = data); - }; + let { user, subject, token } = $derived(data); + let { theme } = $state(data); $themeStore = theme; + $effect(() => (theme = $themeStore)); + $effect(() => browser && connect(token)); onMount(async () => { if (browser) { @@ -58,7 +55,6 @@ } }); - let lost, checkTimer, expireTimer, @@ -83,15 +79,6 @@ clearTimeout(expireTimer); } }); - run(() => { - update(data); - }); - run(() => { - theme = $themeStore; - }); - run(() => { - browser && connect(token); - }); </script> {#if browser && user && $passwordPrompt} @@ -115,13 +102,9 @@ <SvelteToast options={{ reversed: true, intro: { y: 192 } }} /> -<main class="min-h-dvh" data-theme={theme}> +<main class="pb-4 min-h-dvh" data-theme={theme}> <AppHeader {user} {subject} /> {#if !$loading} {@render children?.()} {/if} </main> - -{#if $invoice} - <Invoice {user} /> -{/if} |
